<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>订单导出设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel='stylesheet' type='text/css' href='__PUBLIC__/Admin/css/admin_style.css' />
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/formValidator.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/formValidatorRegex.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/function.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
    $.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){
      window.top.art.dialog({content:msg,lock:true,width:250,height:100,ok:function(){$(obj).focus();}});
    },onsuccess:function(msg,data){var form = $('#myform');$.post(form[0].action, form.serialize(),function(res) {if(!res.status) {window.top.$.thinkbox.error(res.info);return (false);}if(res.status) {window.top.$.thinkbox.success(res.info);setTimeout(function(){window.location.reload();},2000);return (false);}});return false;
    }});
  });
</script>
</head>
<body>
<table width="98%" border="0" cellpadding="4" cellspacing="1" class="table">
<form action="{:U('Config/updatedb')}" method="post" id="myform">
 <tr  class="table_title">
  <td colspan="2">订单导出设置</td>
</tr>                   
<tr class="ji">
  <td class="left">订单字段</td>
  <td>
  <select id="order_field_sec">
	   <option value="order_id">订单ID</option>
	   <option value="order_sn">订单编号</option>
     <option value="order_goods.goods_name">物品名称</option>
     <option value="order_status">订单状态</option>
     <option value="receive_name">收货人</option>
     <option value="mobile">收货号码</option>
     <option value="shipping_address">收货地址</option>
  </select>

  <a id="add_field" href="javascript:void(0)">添加该字段</a>
  <span style="color:#c5b7b7">①订单ID ②订单编号 ③物品名称 ④订单状态 ⑤收货人 ⑥收货号码 ⑦收货地址</span>
  </td>
</tr>


<tr class="ji">
  <td class="left">导出订单字段</td>
  <td>
    <input type="hidden" name="con[export][order_field]" id="order_field" size="35"  value="{$con.export.order_field}">

    <input type="text" name="con[export][order_field_name]" id="order_field_name" size="35"  value="{$con.export.order_field_name}" readOnly>
      <a  id="clear_field" href="javascript:void(0)">清空</a>
  </td>
</tr>

                                
<tr class="ji">
  <td colspan="2">
    <input class="bginput" type="button" name="dosubmit" value="提交" onClick="submit_confirm('myform', '请仔细检查后再提交，不正确的参数都将可能导致网站不能正常运行！', 250,100)">
    <input class="bginput" type="reset" name="Input" value="重置" >
  </td>
</tr>
</form>
</table>
<include file="Index:footer" />
<script>
  $('#add_field').click(function(){

      $('#order_field').val($('#order_field').val() + $('#order_field_sec').val() + ',');


      $('#order_field_name').val($('#order_field_name').val() + $('#order_field_sec').find("option:selected").text() + ',');

  })

    $('#clear_field').click(function() {
        $('#order_field').val('');
        $('#order_field_name').val('');
    });

</script>
</body>
</html>